<template>
    <a-card :bordered="false">
        <!-- 查询区域 -->
        <div class="table-page-search-wrapper">
            <h2>{{description}}</h2>
        </div>
        <!-- 查询区域-END -->
        <!-- table区域-begin -->
        <div>
            <a-table
                    ref="table"
                    size="middle"
                    :scroll="{x:true}"
                    bordered
                    rowKey="id"
                    :columns="columns"
                    :dataSource="dataSource"
                    :pagination="ipagination"
                    :loading="loading"
                    class="j-table-force-nowrap"
                    @change="handleTableChange">
                <template slot="htmlSlot" slot-scope="text">
                    <div v-html="text"></div>
                </template>
            </a-table>
        </div>
    </a-card>
</template>

<script>

    import '@/assets/less/TableExpand.less'
    import { JeecgListMixin } from '@/mixins/JeecgListMixin'

    export default {
        name: 'HcCarUserList',
        mixins: [JeecgListMixin],
        data() {
            return {
                description: '车牌号与收运员绑定管理页面',
                // 表头
                columns: [
                    {
                        title: '序号',
                        dataIndex: '',
                        key: 'rowIndex',
                        width: 60,
                        align: 'center',
                        customRender: function(t, r, index) {
                            return parseInt(index) + 1
                        }
                    },
                    {
                        title: 'ID',
                        align: 'center',
                        dataIndex: 'id'
                    },
                    {
                        title: '收运人',
                        align: 'center',
                        dataIndex: 'userName'
                    },
                    {
                        title: '车牌号',
                        align: 'center',
                        dataIndex: 'carNumber'
                    },
                ],
                url: {
                    list: '/hc/hcCarUser/list',
                },
            }
        },
        methods: {
            initDictConfig() {
                let userInfo = this.$store.getters.userInfo;
                if(userInfo.companysId){
                    this.queryParam.companysId = userInfo.companysId;
                }
            },
        }
    }
</script>
<style scoped>
    @import '~@assets/less/common.less';
</style>
